c3801485c2a1608f39a82043921333f15436e7d8,src/test/java/org/sonar/plugins/stash/client/StashClientTest.java,StashClientTest,testGetPullRequestComments,#,132
Before Change
String stashJsonComment = "{\"values\": [{\"id\":1234, \"text\":\"message\", \"anchor\": {\"path\":\"path\", \"line\":5},"
+ "\"author\": {\"id\":1, \"name\":\"SonarQube\", \"slug\":\"sonarqube\", \"email\":\"sq@email.com\"}, \"version\": 0}]}";
when(response.getStatusCode()).thenReturn(HttpURLConnection.HTTP_OK);
when(response.getResponseBody()).thenReturn(stashJsonComment);
StashCommentReport report = spyClient.getPullRequestComments("Project", "Repository", "1", "path");
After Change
String stashJsonComment = "{\"values\": [{\"id\":1234, \"text\":\"message\", \"anchor\": {\"path\":\"path\", \"line\":5},"
+ "\"author\": {\"id\":1, \"name\":\"SonarQube\", \"slug\":\"sonarqube\", \"email\":\"sq@email.com\"}, \"version\": 0}]}";
wireMock.stubFor(any(anyUrl()).willReturn(aResponse().withStatus(HttpURLConnection.HTTP_OK).withBody(stashJsonComment)
));
StashCommentReport report = client.getPullRequestComments("Project", "Repository", "1", "path");